package com.zjmzxfzhl.integrityconstraint.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author 庄金明
 */
@Target(value = {ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface IntegrityConstraintAnnotation {
    /**
     * 保存完整性缓存或者验证完整性缓存
     *
     * @return
     * @see OperationTypeEnum
     */
    OperationTypeEnum operationType() default OperationTypeEnum.SAVE;

    /**
     * 唯一业务主键业务流水号
     *
     * @return
     */
    String businessKey() default "";

    /**
     * 超时时间,单位秒
     *
     * @return
     */
    long expire() default -1L;

    VerifyAnnotation saveVerify() default @VerifyAnnotation;

    VerifyAnnotation[] checkVerifys() default {};
}
